package cn.service.impl;

import cn.entity.SysUser;
import cn.mapper.SysUserMapper;
import cn.service.SysUserService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.HashMap;

@Service
@Transactional
public class SysUserServiceImpl extends BaseServiceImpl<SysUser> implements SysUserService {

    @Autowired
    SysUserMapper sysUserMapper;

    @Override
    public PageInfo<SysUser> selectPage(int pageNum, int pageSize, HashMap<String, Object> map) {
        PageHelper.startPage(pageNum,pageSize);
        return new PageInfo<SysUser>(sysUserMapper.selectAndRole(map));
    }
}
